<%-- 
    Document   : verTodos
    Created on : 25-may-2012, 2:00:57
    Author     : Luis
--%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
    <logic:present name="informes" >
        <tiles:insert definition="mensaje"></tiles:insert>
            <h1>Lista de Informes </h1>
            <div id="paginador"></div><p>Muestra hasta 4 resultados </p>
            <div id="tableContainer" class="tableContainer">
                <table id="tablaDatos" border="0" cellpadding="0" cellspacing="0" width="70%" class="scrollTable">
                    <thead class="fixedHeader" id="fixedHeader">
                        <tr>
                            <th> Nombre</th>
                            <th> Descargar </th>
                        </tr>
                    </thead>
                    <tbody class="scrollContent">
                    <logic:iterate name="informes" id="informe">
                        <tr>
                            <td>    
                                <bean:write name="informe" property="nombre"/>
                            </td>         
                            <td>  
                                <html:form action="/descargarInforme.do" onsubmit="return this"> 
                                    <div class="buttons">
                                        <html:hidden name="informe" property="idinforme"/>
                                        <html:hidden name="informe" property="nombre"/>
                                            <button type="submit" class="regular">
                                                <img src="interfaz/images/pdf.png" alt=""/>
                                            <bean:message key="boton.descargar" />
                                        </button>
                                    </div>
                                </html:form>
                            </td>
                            <td>  


                            </td>
                        </tr>
                    </logic:iterate>
                </tbody>
            </table>
        </div>
    </logic:present>
    <script type="text/javascript">

        var p = new Paginador(
        document.getElementById('paginador'),
        document.getElementById('tablaDatos'),
        4
    );

        p.Mostrar();
    </script>
</html>
